<?php 
/**
*
*总部信息统计
*
*/
require('./include/init.php');
date_default_timezone_set('Asia/Shanghai');
//连接数据库
$mysql=mysql::getIns();
$sql="select * from alldev";


/*************************************



				数据概况



*************************************/



// $data=$mysql->getAll($sql);
// print_r($data);
//统计当前在线人数    (在线人数为当前时间的十分钟之前到现在的人数)
$maxtime=time();
$mintime=$maxtime-10*60;


$t = time();
$start = mktime(0,0,0,date("m",$t),date("d",$t),date("Y",$t));
$end = mktime(23,59,59,date("m",$t),date("d",$t),date("Y",$t));
/*echo $maxtime . '<br />';
echo $mintime;
exit;*/
$sql="select count(*) from alldev where whitelist <> '1' and timestamp > $mintime and timestamp < $maxtime and shop = 'Audi City BeiJing'";
$allnow=$mysql->getOne($sql);
// print_r($allnow);
// exit;
//统计当天累计人数数

$sql="select count(*) from alldev where whitelist <> '1' and timestamp > $start and timestamp < $end and shop = 'Audi City BeiJing'";
$allday=$mysql->getOne($sql);
// echo $allday;

//当前首次进店人数,通过字段visittimes为1来进行判断
$sql="select count(*) from alldev where whitelist <> '1' and visittimes=1 and timestamp > $mintime and timestamp < $maxtime and shop = 'Audi City BeiJing'";
$firstlogin=$mysql->getOne($sql);
// echo $first;
// exit;
//今天多次进店人数
$sql="select count(*) from alldev where whitelist <> '1' and visittimes <> 1 and timestamp > $mintime and timestamp < $maxtime and shop = 'Audi City BeiJing'";
$secondlogin=$mysql->getOne($sql);

//统计当前销售区
$sql="select count(*) from alldev where whitelist <> '1' and timestamp > $mintime and timestamp < $maxtime and shop = 'Audi City BeiJing' and area in ('销售区','展厅区','精品区')";
$sale=$mysql->getOne($sql);

// print_r($sale);
// exit;
//统计今天售后区
$service=$allnow-$sale;

//统计登陆人数
$sql="select count(*) from alldev where whitelist <> '1' and isOL=1 and timestamp > $mintime and timestamp < $maxtime and shop = 'Audi City BeiJing'";
$login=$mysql->getOne($sql);
// echo $login;

//统计未登陆人数
$sql="select count(*) from alldev where whitelist <> '1' and isOL=2 and timestamp > $mintime and timestamp < $maxtime and shop = 'Audi City BeiJing'";
$nolog=$mysql->getOne($sql);
// echo $nolog;

//统计历史进店人数
$sql="select count(*) from alldev where whitelist <> '1' and shop = 'Audi City BeiJing'";
$history=$mysql->getOne($sql);
// exit;

//统计一层人数
$sql="select count(*) from alldev where whitelist <> '1' and shop = 'Audi City BeiJing' and floor='1' and timestamp > $mintime and timestamp < $maxtime";
$floor1=$mysql->getOne($sql);
//统计二层人数
$sql="select count(*) from alldev where whitelist <> '1' and shop = 'Audi City BeiJing' and floor='2' and timestamp > $mintime and timestamp < $maxtime";
$floor2=$mysql->getOne($sql);
/*****************************************************
*				人流分布
*
***********************************************/

//根据address取出本店的数据来

// $sql="select count(*) from alldev where whitelist <> '1' and isOL=1 and timestamp > $mintime and timestamp < $maxtime and shop='Audi City BeiJing'";

//获取今天凌晨的时间戳
$today = strtotime(date('Y-m-d', time()));

//获取早晨9点的时间戳
$now9=$today+9*60*60;
// echo date('Y-m-d H:i:s',$now9);

//获取今天早晨10点的时间戳
$now10=$today+10*60*60;
$now11=$today+11*60*60;
$now12=$today+12*60*60;
$now13=$today+13*60*60;
$now14=$today+14*60*60;
$now15=$today+15*60*60;
$now16=$today+16*60*60;
$now17=$today+17*60*60;
$now18=$today+18*60*60;
$now19=$today+19*60*60;

//9点时的人数为
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now9 and timestamp < $now10 and shop='Audi City BeiJing'";
$p9=$mysql->getOne($sql);
// echo $p9;

//10点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now10 and timestamp < $now11 and shop='Audi City BeiJing'";
$p10=$mysql->getOne($sql);

//11点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now11 and timestamp < $now12 and shop='Audi City BeiJing'";
$p11=$mysql->getOne($sql);


//12点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now12 and timestamp < $now13 and shop='Audi City BeiJing'";
$p12=$mysql->getOne($sql);


//13点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now13 and timestamp < $now14 and shop='Audi City BeiJing'";
$p13=$mysql->getOne($sql);


//14点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now14 and timestamp < $now15 and shop='Audi City BeiJing'";
$p14=$mysql->getOne($sql);


//15点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now15 and timestamp < $now16 and shop='Audi City BeiJing'";
$p15=$mysql->getOne($sql);


//16点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now16 and timestamp < $now17 and shop='Audi City BeiJing'";
$p16=$mysql->getOne($sql);

//17点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now17 and timestamp < $now18 and shop='Audi City BeiJing'";
$p17=$mysql->getOne($sql);


//18点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now18 and timestamp < $now19 and shop='Audi City BeiJing'";
$p18=$mysql->getOne($sql);
// exit;


//昨天9点时间戳
$yesd9=$today+9*60*60-24*60*60;
$yesd10=$today+10*60*60-24*60*60;
$yesd11=$today+11*60*60-24*60*60;
$yesd12=$today+12*60*60-24*60*60;
$yesd13=$today+13*60*60-24*60*60;
$yesd14=$today+14*60*60-24*60*60;
$yesd15=$today+15*60*60-24*60*60;
$yesd16=$today+16*60*60-24*60*60;
$yesd17=$today+17*60*60-24*60*60;
$yesd18=$today+18*60*60-24*60*60;
$yesd19=$today+19*60*60-24*60*60;


//昨天9点时的人数为
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd9 and timestamp < $yesd10 and shop='Audi City BeiJing'";
$b9=$mysql->getOne($sql);
// echo $p9;

//昨天10点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd10 and timestamp < $yesd11 and shop='Audi City BeiJing'";
$b10=$mysql->getOne($sql);

//昨天11点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd11 and timestamp < $yesd12 and shop='Audi City BeiJing'";
$b11=$mysql->getOne($sql);


//昨天12点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd12 and timestamp < $yesd13 and shop='Audi City BeiJing'";
$b12=$mysql->getOne($sql);


//昨天13点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd13 and timestamp < $yesd14 and shop='Audi City BeiJing'";
$b13=$mysql->getOne($sql);


//昨天14点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd14 and timestamp < $yesd15 and shop='Audi City BeiJing'";
$b14=$mysql->getOne($sql);


//昨天15点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd15 and timestamp < $yesd16 and shop='Audi City BeiJing'";
$b15=$mysql->getOne($sql);


//昨天16点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd16 and timestamp < $yesd17 and shop='Audi City BeiJing'";
$b16=$mysql->getOne($sql);

//昨天17点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd17 and timestamp < $yesd18 and shop='Audi City BeiJing'";
$b17=$mysql->getOne($sql);


//昨天18点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $yesd18 and timestamp < $yesd19 and shop='Audi City BeiJing'";
$b18=$mysql->getOne($sql);
// echo $b18;


//获取上周周一的时间
$one=strtotime('-2 monday', time());
// echo $one . '<br />';
// echo date('Y-m-d H:i:s',$one);
//获取上周周二时间
$two=strtotime('-2 monday', time())+24*3600*1;

//获取上周周三时间
$three=strtotime('-2 monday', time())+24*3600*2;

//获取上周周四时间
$four=strtotime('-2 monday', time())+24*3600*3;

//获取上周周五时间
$five=strtotime('-2 monday', time())+24*3600*4;

//获取上周周六时间
$six=strtotime('-2 monday', time())+24*3600*5;

//获取上周周日时间
$seven=strtotime('-2 monday', time())+24*3600*6;
// echo date('Y-m-d H:i:s',$seven);

//获取本周周一
$nowone=strtotime('-2 monday', time())+24*3600*7;
// echo date('Y-m-d H:i:s',$nowone);

//获取上周周一的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $one and timestamp < $two and shop='Audi City BeiJing'";
$onep=$mysql->getOne($sql);
// echo $one;
// exit;

//获取上周周二的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $two and timestamp < $three and shop='Audi City BeiJing'";
$twop=$mysql->getOne($sql);

//获取上周周三的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $three and timestamp < $four and shop='Audi City BeiJing'";
$threep=$mysql->getOne($sql);


//获取上周周四的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $four and timestamp < $five and shop='Audi City BeiJing'";
$fourp=$mysql->getOne($sql);


//获取上周周五的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $five and timestamp < $six and shop='Audi City BeiJing'";
$fivep=$mysql->getOne($sql);

//获取上周周六的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $six and timestamp < $seven and shop='Audi City BeiJing'";
$sixp=$mysql->getOne($sql);

//获取上周周日的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $seven and timestamp < $nowone and shop='Audi City BeiJing'";
$sevenp=$mysql->getOne($sql);
// echo $sevenp;
// exit;


//获取上个月第一天时间
$first =mktime(0,0,0,date('m',time())-1,1,date('Y',time()));
// echo date('Y-m-d H:i:s',$first);
//获取上个月第二周时间
$second=$first+7*24*3600;
// echo date('Y-m-d H:i:s',$second);

//获取上个月第三周时间
$third=$second+7*24*3600;

//获取上个月第四周时间
$fourth=$third+7*24*3600;
// echo date('Y-m-d H:i:s',$fourth);

//获取上个月第五周时间
$fifth =mktime(0,0,0,date('m',time()),1,date('Y',time()));
// $fifth=$fourth+7*24*3600;
// echo date('Y-m-d H:i:s',$fifth);
// exit;


//获取上个月第一周的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $first and timestamp < $second and shop='Audi City BeiJing'";
$firstp=$mysql->getOne($sql);
// echo $one;
// exit;

//获取上月第二周的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $second and timestamp < $third and shop='Audi City BeiJing'";
$secondp=$mysql->getOne($sql);

//获取上月第三周的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $third and timestamp < $fourth and shop='Audi City BeiJing'";
$thirdp=$mysql->getOne($sql);


//获取上月第四周的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $fourth and timestamp < $fifth and shop='Audi City BeiJing'";
$fourthp=$mysql->getOne($sql);


//获取第一季度开始时间戳
$firstmonth =mktime(0,0,0,1,1,date('Y',time()));

//获取第二季度开始时间
$secondmonth =mktime(0,0,0,4,1,date('Y',time()));
// echo date('Y-m-d H:i:s',$secondmonth);

//获取第三季度开始时间
$thirdmonth =mktime(0,0,0,7,1,date('Y',time()));
// echo date('Y-m-d H:i:s',$thirdmonth);

//获取第四季度开始时间
$fourthmonth =mktime(0,0,0,10,1,date('Y',time()));
// echo date('Y-m-d H:i:s',$fourthmonth);

//获取明年第一季度开始时间
$firstmonths =mktime(0,0,0,1,1,date('Y',time())+1);
// echo date('Y-m-d H:i:s',$firstmonths);



//获取第一季度的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $firstmonth and timestamp < $secondmonth and shop='Audi City BeiJing'";
$firstmonth=$mysql->getOne($sql);
// echo $one;
// exit;

//获取第二季度的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $secondmonth and timestamp < $thirdmonth and shop='Audi City BeiJing'";
$secondmonth=$mysql->getOne($sql);

//获取第三季度的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $thirdmonth and timestamp < $fourthmonth and shop='Audi City BeiJing'";
$thirdmonth=$mysql->getOne($sql);
// echo $thirdmonth;
// exit;


//获取第四季度的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $fourthmonth and timestamp < $firstmonths and shop='Audi City BeiJing'";
$fourthmonth=$mysql->getOne($sql);

// echo $fourthmonth;
// exit;






/*********************************


		wifi



****************************************/

/****************************************


		4s店的wifi登录率


****************************************/

// echo $login;

// echo $allday;
// exit;
// echo $denglu;
$loginnum=ceil(($login/$allnow)*100);
// echo $loginnum;
// exit;

//未登录
$nologinnum=100-$loginnum;







/***************************************


			进店


****************************************/


/*************************************

	进店频次(每天统计一次,今天累计人数的进店频次)


************************************/
//今天累计进店人数为$allday;

//统计进店频次为2次的
$sql="select count(*) from alldev where whitelist <> '1' and timestamp > $start and timestamp < $end  and visittimes='2' and shop = 'Audi City BeiJing'";
$visittwo=$mysql->getOne($sql);
// echo $visittwo;
// exit;

//统计进店频次为3次
$sql="select count(*) from alldev where whitelist <> '1' and timestamp > $start and timestamp < $end  and visittimes='3' and shop = 'Audi City BeiJing'";
$visitthree=$mysql->getOne($sql);
// echo $visitthree;
// exit;



//统计进店频次为3次以上
$sql="select count(*) from alldev where whitelist <> '1' and timestamp > $start and timestamp < $end  and visittimes > '3' and shop = 'Audi City BeiJing'";
$visitmore=$mysql->getOne($sql);
// echo $visitmore;
// exit;

//计算频次

//两次
$vtwo=floor(($visittwo/$allday)*100);
// echo $vtwo;
// exit;
//三次
$vthree=floor(($visitthree/$allday)*100);
// echo $vthree;
// exit;

//三次以上
$vmore=floor(($visitmore/$allday)*100);
// echo $vmore;
// exit;

//一次
$vone=100-$vtwo-$vthree-$vmore;
// echo $vone;
// exit;



/*****************************************


平均停留时长


*****************************************/

//取当前这个时段内的用户的平均停留时长
//9点时的人数为
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now9 and timestamp < $now10 and shop='Audi City BeiJing' and staytime < 43200";
$p9=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now9 and timestamp < $now10 and shop='Audi City BeiJing' and staytime < 43200";
$stay9=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime9=ceil(($stay9/$p9)/60);

// echo $p9;

//10点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now10 and timestamp < $now11 and shop='Audi City BeiJing' and staytime < 43200";
$p10=$mysql->getOne($sql);
//10点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now10 and timestamp < $now11 and shop='Audi City BeiJing' and staytime < 43200";
$stay10=$mysql->getOne($sql);
//10点时的平均停留时长
// @$staytime10=ceil(($stay10/$p10)/60);




//11点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now11 and timestamp < $now12 and shop='Audi City BeiJing' and staytime < 43200";
$p11=$mysql->getOne($sql);
//11点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now11 and timestamp < $now12 and shop='Audi City BeiJing' and staytime < 43200";
$stay11=$mysql->getOne($sql);
//11点时的平均停留时长
// @$staytime11=ceil(($stay11/$p11)/60);






//12点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now12 and timestamp < $now13 and shop='Audi City BeiJing' and staytime < 43200";
$p12=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now12 and timestamp < $now13 and shop='Audi City BeiJing' and staytime < 43200";
$stay12=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime12=ceil(($stay12/$p12)/60);






//13点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now13 and timestamp < $now14 and shop='Audi City BeiJing' and staytime < 43200";
$p13=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now13 and timestamp < $now14 and shop='Audi City BeiJing' and staytime < 43200";
$stay13=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime13=ceil(($stay13/$p13)/60);





//14点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now14 and timestamp < $now15 and shop='Audi City BeiJing' and staytime < 43200";
$p14=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now14 and timestamp < $now15 and shop='Audi City BeiJing' and staytime < 43200";
$stay14=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime14=ceil(($stay14/$p14)/60);






//15点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now15 and timestamp < $now16 and shop='Audi City BeiJing' and staytime < 43200";
$p15=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now15 and timestamp < $now16 and shop='Audi City BeiJing' and staytime < 43200";
$stay15=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime15=ceil(($stay15/$p15)/60);








//16点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now16 and timestamp < $now17 and shop='Audi City BeiJing' and staytime < 43200";
$p16=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now16 and timestamp < $now17 and shop='Audi City BeiJing' and staytime < 43200";
$stay16=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime16=ceil(($stay16/$p16)/60);






//17点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now17 and timestamp < $now18 and shop='Audi City BeiJing' and staytime < 43200";
$p17=$mysql->getOne($sql);
//9点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now17 and timestamp < $now18 and shop='Audi City BeiJing' and staytime < 43200";
$stay17=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime17=ceil(($stay17/$p17)/60);






//18点时的人数
$sql="select count(*) from alldev where whitelist <> '1' and timestamp >= $now18 and timestamp < $now19 and shop='Audi City BeiJing' and staytime < 43200";
$p18=$mysql->getOne($sql);
//18点时的停留时长总和
$sql="select sum(staytime) from alldev where whitelist <> '1' and timestamp >= $now18 and timestamp < $now19 and shop='Audi City BeiJing' and staytime < 43200";
$stay18=$mysql->getOne($sql);
//9点时的平均停留时长
// @$staytime18=ceil(($stay18/$p18)/60);



//计算现在的时间
$thishour=date('H',time());
switch ($thishour) {
	case '9':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=0;
		$staytime11=0;
		$staytime12=0;
		$staytime13=0;
		$staytime14=0;
		$staytime15=0;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '10':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=0;
		$staytime12=0;
		$staytime13=0;
		$staytime14=0;
		$staytime15=0;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '11':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=0;
		$staytime13=0;
		$staytime14=0;
		$staytime15=0;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '12':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=0;
		$staytime14=0;
		$staytime15=0;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '13':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=ceil(($stay13/$p13)/60);
		$staytime14=0;
		$staytime15=0;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '14':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=ceil(($stay13/$p13)/60);
		$staytime14=ceil(($stay14/$p14)/60);
		$staytime15=0;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '15':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=ceil(($stay13/$p13)/60);
		$staytime14=ceil(($stay14/$p14)/60);
		$staytime15=ceil(($stay15/$p15)/60);;
		$staytime16=0;
		$staytime17=0;
		$staytime18=0;
		break;
	case '16':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=ceil(($stay13/$p13)/60);
		$staytime14=ceil(($stay14/$p14)/60);
		$staytime15=ceil(($stay15/$p15)/60);
		$staytime16=ceil(($stay16/$p16)/60);
		$staytime17=0;
		$staytime18=0;
		break;
	case '17':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=ceil(($stay13/$p13)/60);
		$staytime14=ceil(($stay14/$p14)/60);
		$staytime15=ceil(($stay15/$p15)/60);
		$staytime16=ceil(($stay16/$p16)/60);
		$staytime17=ceil(($stay17/$p17)/60);
		$staytime18=0;
		break;
	case '18':
		$staytime9=ceil(($stay9/$p9)/60);
		$staytime10=ceil(($stay10/$p10)/60);
		$staytime11=ceil(($stay11/$p11)/60);
		$staytime12=ceil(($stay12/$p12)/60);
		$staytime13=ceil(($stay13/$p13)/60);
		$staytime14=ceil(($stay14/$p14)/60);
		$staytime15=ceil(($stay15/$p15)/60);
		$staytime16=ceil(($stay16/$p16)/60);
		$staytime17=ceil(($stay17/$p17)/60);
		$staytime18=ceil(($stay18/$p18)/60);
		break;
}



// exit;


require(ROOT . 'view/iwocar5/AudiCityBeijing.html');
 ?>
